const express = require('express')
const router = express.Router()
const { validateRegister } = require('./validators/validateRegister')
const { validateLoginByName } = require('./validators/validateLoginByName')
const { register, loginByName } = require('../../controllers/auth')
const { checkMobile } = require("../../controllers/auth/helpers/checkMobile")

router.post('/register', validateRegister, checkMobile, register)
router.post('/login_byname', validateLoginByName, loginByName)

module.exports = router